import 'package:flutter/material.dart';
import 'package:flutter_kline/vo/line_chart_vo.dart';

import '../common/kline_config.dart';
import '../vo/bar_chart_vo.dart';

class ExampleEssData {
  static final List<double?> _dataList = [
    null,
    null,
    0,
    0,
    0,
    0,
    0,
    6.7161603780268,
    17.94132427378241,
    27.63418117809526,
    26.515286271490496,
    27.920754688510385,
    36.26786994242738,
    66.75876341274139,
    75.37145780330515,
    76.90407878457394,
    85.92273799386581,
    92.00224115522914,
    99.57934673042517,
    99.61654717678891,
    99.61229832451605,
    100.00000000000009,
    100.00000000000009,
    90.43142527853885,
    65.86092953733956,
    33.45605184920516,
    8.73931129828307,
    4.007459308915441,
    6.522585268141355,
    6.704437455496655,
    5.510916651378951,
    2.764063801802221,
    2.787352464682373,
    16.366882605868163,
    47.975971891601446,
    100.00000000000036,
    100.00000000000024,
    100.00000000000017,
    100.00000000000011,
    100.00000000000009,
    96.9673215909899,
    95.23978769449666,
    89.53079223396655,
    77.48902174549949,
    62.79644779579323,
    45.57048331796464,
    29.34575601106572,
    7.747357199024189,
    7.164323600194968e-15,
    8.204289871394673,
    12.74878107732283,
    17.21215796533604,
    9.53699320960826,
    4.364105947594138,
    1.2003342249569235e-14,
    2.7183672170598663,
    11.075552270899863,
    16.01806578671272,
    17.423236071711838,
    22.22711847326975,
    46.3322041962887,
    68.63835196453327,
    83.42746074373464,
    72.8878026565651,
    79.21239053361083,
    83.94903637555741,
    97.13203108161198,
    92.18964861595445,
    92.0876542294436,
    92.41255625493133,
    98.4663547918921,
    95.46618313861153,
    75.61225159667264,
    49.48287973707737,
    19.247721947960265,
    9.02342075344449,
    5.811466830014565,
    8.665442689543855,
    27.128674583229866,
    49.64400297805126,
    72.94727174636367,
    82.0854378532251,
    71.23074973594845,
    58.30934103716147,
    37.56457668243854,
    56.864309027179125,
    60.61846831388856,
    68.33039028856803,
    35.02920376630198,
    31.033023267443667,
    30.008867161963632,
    52.19368248602624,
    67.70544106616403,
    87.87338466180641,
    84.69072697671362,
    64.03498829673518,
    41.147331697949994,
    16.99333844263209,
    10.791418495201553,
    7.651473995520262,
    7.036998047921417,
    13.939809338593582,
    17.29052247851079,
    42.48053223578016,
    65.88489722702862,
    93.58946350596761,
    99.3511879704394,
    99.44416668852821,
    100.00000000000011,
    100.00000000000011,
    100.00000000000013,
    91.44115271314335,
    85.30870888539923,
    64.64147445026634,
    50.47184097813714,
    24.154763272793325,
    16.89640596901348,
    6.016718573691473,
    5.787327159234524,
    11.101586781166523,
    27.07576978336419,
    26.20830691210588,
    18.043868884238947,
    5.911904600785304,
    20.830751807839132,
    20.767731373311005,
    13.524695748730814,
    2.7957579786980818e-14,
    4.6426382908743,
    17.080561063350704,
    44.68056769031193,
    75.81798533102646,
    100.0000000000002,
    100.00000000000017,
    93.46748349086947,
    81.18629145735088,
    73.46904093773948,
    72.83929976910633,
    77.9035702999163,
    79.82873601733147,
    59.37081832195027,
    29.7204525817937,
    1.947826867770892,
    4.873673708428134e-14,
    3.8756700373722076e-14,
    3.4234487928934275e-14,
    3.2232473475581194e-14,
    3.0864906700965734e-14,
    8.11750539201511,
    13.827323082691958,
    29.362053485653743,
    39.60780088408352,
    37.79425854821426,
    19.567073109173904,
    5.5139142544515786e-14,
    4.765233125159474,
    18.298031418490968,
    26.054962850109,
    54.72835448275647,
    75.82612099589146,
    99.67388313126295,
    100.0000000000002,
    82.29051360251843,
    57.64413158764378,
    53.98238471344402,
    70.65169879718131,
    96.65382492007278,
    99.13989406268546,
    99.21955046122662,
    94.34946068485071,
    80.6794989875226,
    74.55887886231281,
    80.8679750606592,
    87.66178599528263,
    87.77191763704111,
    69.8858100756382,
    59.81517042813288,
    54.537950340541094,
    52.17079446050714,
    64.3127030423131,
    56.640843997490755,
    55.52793935355581,
    59.82590219188862,
    44.41711205522138,
    48.792479124258,
    29.884988341713527,
    44.52820656353052,
    37.36491262818395,
    32.501490071083076,
    16.09033374018682,
    10.937686428273539,
    5.212680845445833,
    4.704554301447552,
    5.192390917779171e-14,
    2.343945315195687,
    4.009709783578656,
    3.989419532514894,
    2.5227807121883066,
    4.364640043861524,
    25.097063436722127,
    49.3784952338456,
    67.38338588132055,
    54.378549148293445,
    26.17646502688024,
    6.257819023096238,
    15.072371719403579,
    31.868538746007342,
    51.26243039034735,
    57.29556899504511,
    54.21386699699372,
    64.26509277680528,
    54.80380477614322,
    75.1179718417952,
    69.48456621473773,
    73.00179265497691,
    54.09123917519485,
    50.73572776593801,
    76.89727642030768,
    95.08408261228762,
    100.00000000000036,
    94.9626860890051,
    83.21170157084376,
    74.48711435789684,
    69.44626109864829,
    69.0921606323325,
    49.90192488427231,
    19.738352898336974,
    3.1867676090310515,
    2.7030542135027993,
    2.6408231307227923,
    9.041671986721236e-14,
    29.454294590094232,
    66.10446184383741,
    97.28403113087143,
    99.50713963047832,
    99.576585896521,
    94.45862690988129,
    89.94581489373905,
    88.51219519498784,
    93.57453021156664,
    92.8139622701166,
    88.62712104651146,
    81.41485306358778,
    78.58524480830368,
    48.96349358404472,
    17.437319189641332,
    0.6284167596992543,
    7.89798594371502,
    19.16382646109574,
    38.78975208356301,
    41.57745100579904,
    42.97996476309495,
    28.095445002347297,
    24.73086401283785,
    44.81881649432264,
    79.187590580281,
    91.6779109969233,
    73.99605806220173,
    44.6737165808772,
    18.70177638376357,
    4.279445067550139,
    1.0171651808017317e-13,
    16.78999644973385,
    26.0521206908384,
    40.381143807701626,
    43.581863676421264,
    44.320177205015945,
    26.987566290797083,
    4.83786606016558,
    1.072878465271563,
    1.0200247039368013,
    0.923070040024917,
    7.063393980422349e-14,
    14.473334983074256,
    29.973067916464768,
    49.357200181711384,
    65.57777949540588,
    72.95927485701512,
    65.92356417528367,
    52.425894609230326,
    65.55205110976226,
    62.88551727073628,
    53.777323849648205,
    43.723929408093305,
    58.829625602688395,
    52.56582091361186,
    23.701853297553043,
    1.439794891248111,
    1.2283479750734526e-13,
    1.1319649643953147e-13,
    22.594113977630172,
    39.72826810305145,
    57.231076741332906,
    41.36971141938863,
    28.663983045019638,
    14.138014801209318,
    7.106844960362173,
    2.175478877770878,
    9.460155730951018e-14,
    7.766902157776581e-14,
    4.5380262089362935,
    7.6637323653179585,
    20.525582091195584,
    29.178450253046957,
    41.625690757425396,
    40.683675124635215,
    54.28066493081065,
    84.31351280240804,
    100.00000000000024,
    100.00000000000017,
    100.00000000000017,
    100.00000000000016,
    100.00000000000016,
    95.70501958110083,
    96.02880090226448,
    92.37724876219391,
    79.0926037798236,
    48.514567286756815,
    5.627047400684312,
    1.5555491683360796,
    1.328722986447722,
    1.0383511221180172e-13,
    8.675807370967396e-14,
    1.504327026491552,
    4.493647796259373,
    20.14248200929053,
    35.64361805535894,
    66.93497586685206,
    80.67279542044513,
    96.44372711518358,
    95.65806691172364,
    96.30482794427017,
    91.83418353922855,
    82.04743484103938,
    67.58884088424458,
    51.366779288804075,
    34.20387376282375,
    14.43387379061277,
    9.157509201462749e-14,
    8.174653481747736e-14,
    3.1518982510673053,
    12.097988175536956,
    27.05030676525818,
    40.04175280747641,
    63.30294840783157,
    81.35837979716882,
    99.24467020556966,
    99.33707958982966,
    93.11133364424437,
    93.4181562905025,
    85.11023746917952,
    87.62633395615931,
    74.5531646554854,
    81.32995079112622,
    82.05717725038394,
    100.00000000000063,
    95.7426484889172,
    83.80908254679669,
    59.589047431133444,
    29.249613483133025,
    7.9769924668924475,
    1.509165893697097e-13,
    1.0990911751300442e-13,
    8.662756897537249e-14,
    8.16387139227373e-14,
    7.762232431598495e-14,
    2.351568523824271,
    3.369594834630099,
    25.60110189827809,
    48.51854322542074,
    82.8436611087157,
    86.48588708787976,
    87.10685790430419,
    72.09672454797763,
    72.80253589488153,
    75.30949665221239,
    78.9591205140121,
    65.23689117236768,
    38.6096589272431,
    7.183572391873612,
    2.2898429138164817e-13,
    2.208086784755908e-13,
    17.546989734324413,
    30.963613287230046,
    49.934798254352394,
    72.42226470640037,
    91.52047901932539,
    100.00000000000028,
    100.00000000000023,
    90.07495059622653,
    78.12806142871392,
    47.667872065879884,
    23.822119922607257,
    6.0560617385936055,
    7.418110209662954,
    7.982480633211324,
    5.663402129881929,
    3.739761771752148,
    3.382785527171523,
    1.1870013150046403e-13,
    1.6386995967391867e-13,
    2.0583892754809519e-13,
    2.029915400310534e-13,
    6.117174167747758,
    5.129359923454809,
    17.452468603587,
    47.44398031188886,
    79.51559465276151,
    99.34719422968465,
    98.99407219627727,
    99.6681148762048,
    87.33908396227619,
    76.506656913174,
    50.91821078710264,
    30.97144213082193,
    20.37503587646387,
    24.335260095679715,
    59.64989081910507,
    80.63589832592378,
    95.96963141830255,
    83.50372642168361,
    66.472620072596,
    46.849351556784654,
    28.151642233032504,
    27.12813274030922,
    42.53787680423502,
    67.60261630371194,
    80.96215823110896,
    88.60286277620905,
    83.01374941451442,
    68.5069822963598,
    53.34036940308133,
    51.24481099785114,
    58.53817489694776,
    54.87373585055547,
    37.6776253649226,
    13.846748514558652,
    1.241141871182332,
    1.970030067308357e-13,
    1.8525591076482334e-13,
    9.586455107774825,
    10.358073870233692,
    13.274676922917136,
    4.155932424729259,
    2.799184514107068,
    1.5818909725770547e-13,
    1.4137335694403834e-13,
    24.69507545353704,
    57.457062030214956,
    84.10829311032556,
    76.18975164424671,
    74.41529259902863,
    81.31384226274305,
    98.25433880346715,
    98.37573930601977,
    98.5748090843736,
    95.7712521593418,
    97.14561965158344,
    92.43088451863622,
    88.98643297656022,
    75.40277293001785,
    75.93871260431088,
    81.38982896760692,
    100.00000000000044,
    100.00000000000036,
    96.88659503872236,
    96.0408425869454,
    85.80601961461146,
    75.0983897798177,
    59.495340116982,
    52.424262038658966,
    55.22708191945653,
    40.98666950898013,
    24.457731820145348,
    1.6395256073619056,
    1.6042530560814776,
    12.818055621865065,
    8.332421469705691,
    6.536785036317778,
    18.07945523163425,
    35.53749045372193,
    52.13301382747058,
    50.71461223642959,
    40.735349108947545,
    24.36209290679834,
    9.312585820291142,
    4.2235796605137015,
    4.547053653045867,
    13.648840719410362,
    14.210863844924972,
    34.459068726446276,
    49.17878543804516,
    75.03870663777538,
    86.81514461028655,
    85.72680339379404,
    69.55970773511459,
    46.367811135170776,
    21.337827467772392,
    10.835678446670368,
    2.332230307550548e-13,
    5.088957916033817,
    6.692961216167041,
    6.481368073126687,
    16.558307223161652,
    35.82678431704924,
    73.58293830998039,
    98.39538438398172,
    96.83019436505937,
    70.4018441148468,
    60.58516890181236,
    71.28901697512504,
    82.45494304571316,
    80.49860194545286,
    66.1830389727862,
    62.65791112529486,
    49.7576736028827,
    45.84755809835353,
    42.051051045997134,
    54.446795457516906,
    70.12604272877128,
    89.79359711489008,
    98.84628804571008,
    96.66324719870134,
    94.76018296553409,
    90.82193378497068,
    69.95393329697887,
    40.21858831856392,
    14.280258965009333,
    9.444025893970542,
    9.283988151507623,
    2.110374485284431,
    0.10635744195534727,
    9.35310398626162e-14,
    4.4527273247331935,
    10.848443105329387,
    18.55807594205264,
    14.79415508629538,
    7.02719446170209,
    0.495111555349554,
    6.612592783337126,
    13.470331670658023,
    37.612515132048166,
    40.06226437911089,
    30.723393564824725,
    8.63864560462424,
    2.969248762426448e-13,
    15.842909269791372,
    48.861583873661715,
    76.83217311736401,
    85.3530627865656,
    73.82323604989406,
    82.98722784628498,
    92.02912337604383,
    90.67263624442981,
    82.99733746059277,
    82.9433897953723,
    85.8204724654404,
    94.4052518768648,
    92.10229001646967,
    89.69967076449159,
    82.79183857105868,
    84.47730369002491,
    92.81949862326852,
    89.7916480513525,
    81.12263570361202,
    80.6036492406208,
    81.11817344817878,
    73.07667822989401,
    56.3630656422886,
    45.300719566611406,
    30.196443346169342,
    12.652685970181949,
    36.96175128151589,
    74.20493118292781,
    85.87980758431766,
    86.21592174843131,
    63.92909325688102,
    54.74326258153651,
    24.439969689950118,
    19.781011812524714,
    8.328490293753358,
    6.457862366135882,
    1.6777282696379116e-13,
    7.218365186346714,
    12.028893053871382,
    14.104720244424302,
    7.47954051680023,
    2.2043720781906423e-13,
    0.752889282012366,
    10.53635828712642,
    11.935992445027143,
    29.095912087395902,
    33.09339669415081,
    50.26420450155946,
    44.775467315145505,
    34.10807061118966,
    12.748061543958524,
    1.9557619681630576,
    3.225453357613136,
    6.4683671663008635,
    12.260254569785765,
    9.490309922487889,
    5.639579780231835,
    31.052869696627106,
    61.85516763871387,
    88.21534536273498,
    90.29375220009635,
    93.21453022645426,
    99.00370221837255,
    99.03581477957933,
    98.31087905271879,
    99.39414756427139,
    99.47789146626404,
    100.00000000000016,
    95.22530570844052,
    85.96492797694935,
    70.8881352989616,
    53.29979527787665,
    53.68782507424886,
    58.311376171519015,
    60.576223852599206,
    64.2352765095626,
    48.34058954226166,
    71.08793537030424,
    77.309230097382,
    100.00000000000033,
    91.619834698732,
    91.40511479705657,
    86.85110495028503,
    79.40134973397593,
    67.60488130265877,
    66.70292745567549,
    52.65259100882441,
    35.07661470703031,
    6.6835667177323765,
    6.499198046396481,
    10.144264877119438,
    6.956085237085322,
    6.315724829291342,
    3.7150396870148574,
    8.50450875597559,
    17.083392995740724,
    15.713108094621086,
    28.63184985458741,
    36.659049300213034,
    48.55145228950782,
    58.21993474480666,
    78.08393743459528,
    99.9173193205567,
    100.00000000000031,
    100.00000000000028,
    100.00000000000027,
    87.75280965283685,
    78.18865654601969,
    67.14455007088957,
    74.5055216153054,
    77.00929921312722,
    72.47011028420519,
    61.46612723669767,
    51.77287802058738,
    57.342382833741844,
    62.96948021247177,
    47.865561080060814,
    18.97558542377777,
    2.3439730071846063e-13,
    1.6127567588342367e-13,
    1.2867981660943902e-13,
    5.7921688767381765,
    7.216439518541548,
    11.366536185414745,
    6.696396079603821,
    5.1125330015576305,
    5.886574388855995,
    5.945744860258094,
    7.854178237772425,
    2.226416617706653e-13,
    40.63304607436381,
    70.13458285599312,
    92.93323146069889,
    89.1022251630488,
    79.28344274196478,
    66.09917161189924,
    56.198037238330215,
    69.09013996906998,
    87.52927739482774,
    100.00000000000033,
    79.02514000053267,
    43.875773201920474,
    10.000000658661342,
    1.2736694819963308,
    1.5951860454810529e-13,
    1.4167012346270665e-13,
    1.321705972732677e-13,
    7.272607117079293,
    9.573230810032024,
    12.413361342312712,
    5.230200882428753,
    12.390899418712852,
    34.20363153169711,
    74.86804985211386,
    94.38520429301849,
    77.19112691401612,
    63.76328260786077,
    48.882970125298364,
    63.714386274363434,
    64.56981169910266,
    82.5989944394531,
    82.17637774095246,
    88.12605870772899,
    85.61990255545714,
    88.71241486155859,
    82.88743123628025,
    66.40224881133182,
    55.94573215554863,
    72.55402418107134,
    94.69444611406811,
    100.00000000000038,
    90.45352384690165,
    75.97675009089805,
    48.947893284809446,
    22.952696159185663,
    14.759964704450573,
    13.12544171538196,
    24.03182480742733,
    37.94044951129521,
    62.41639689942261,
    85.02615702143899,
    96.05854567150253,
    95.11683207143024,
    83.06343850097096,
    69.86602214515112,
    54.91964579654285,
    50.4366096851022,
    34.86848453705319,
    20.407084800221686,
    0.3006787451178397,
    1.415546867687967e-13,
    1.9343169748409355,
    2.160053469548749,
    2.411890641886231,
    1.8103030101594047e-13,
    10.634669505330853,
    17.881405611866917,
    23.45670104615265,
    11.066000933692859,
    2.832161796239091,
    28.88636127769563,
    61.28254189646919,
    89.93098710773889,
    93.22995940470577,
    95.3418825414806,
    87.91424209959831,
    74.57882622794163,
    59.18175306681448,
    43.24409518138547,
    35.638902523014224,
    29.29957449030623,
    27.3064352525081,
    16.254678214246397,
    3.709227910002412,
    2.0462880258535578e-13,
    11.115507651816825,
    28.23004000355854,
    39.144730868674465,
    42.17770276560464,
    65.59492358624848,
    81.74743833084615,
    84.98842698539939,
    69.6220768214218,
    57.54335755980286,
    46.405131698397604,
    41.94807888965111,
    43.9564873451712,
    65.81402192358155,
    84.899040160186,
    84.69656289356267,
    62.73999710641031,
    49.13116861938647,
    52.628099228117485,
    64.67626348286008,
    58.82630679218271,
    77.12708174824272,
    82.5852854366644,
    96.34034866841994,
    96.81966328181191,
    100.00000000000017,
    92.66127713007603,
    79.91950317909945,
    73.44676807131046,
    73.35506249676423,
    67.32830476588083,
    44.278742812819566,
    10.24420608971719,
    7.780529275132106,
    6.012138936448018,
    2.2321202429874365,
    2.8479345373683036,
    5.654778905832448,
    5.535826981256839,
    2.9097547662713446
  ];

  static BarChartVo get barChartData {
    List<BarChartData?> dataList = [];
    for (int i = 0; i < _dataList.length; ++i) {
      Color color = i % 2 == 0 ? KlineConfig.green : KlineConfig.red;
      bool isFill = true;
      dataList.add(
          BarChartData(value: _dataList[i] ?? 0, color: color, isFill: isFill));
    }

    return BarChartVo(name: 'ESS', data: dataList.toList());
  }

  static LineChartVo get lineChartA {
    return LineChartVo(
      name: 'A',
      color: KlineConfig.kLineColors[0],
      data: List.generate(800, (index) => LineChartData(value: 30)),
    );
  }

  static LineChartVo get lineChartB {
    return LineChartVo(
      name: "B",
      color: KlineConfig.kLineColors[1],
      data: List.generate(800, (index) => LineChartData(value: 70)),
    );
  }
}
